﻿<?xml version="1.0"?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="Blazing.BusinessObjects" namespace="Blazing.BusinessObjects.Locations" >
	<class name="Address" table="addresses" lazy="false" dynamic-insert="true" dynamic-update="true">

		<id name="ID" column="addressid" type="Int32">
			<generator class="native" />
		</id>
		<timestamp column="rowstamp" name="RowStamp" />

		<property name="Address1" length="75" not-null="true" />
		<property name="Address2" length="50" />
		<property name="Address3" length="50" />
		<property name="Suburb" length="50" />
		<property name="Postcode" length="10" />

		<many-to-one name="Country" column="countryid" class="Country" />
		<many-to-one name="State" column="stateid" class="State" />
		<many-to-one name="AddressType" column="addresstypeid" class="AddressType" />
    <many-to-one name="Geocode" column="geocodeid" class="Blazing.BusinessObjects.Cms.Geocode" cascade="all-delete-orphan" />

	</class>
</hibernate-mapping>
